package config

import (
	"github.com/spf13/viper"
	"os"
)

func Init() error {
	cwd, _ := os.Getwd()
	viper.SetConfigName("config")
	viper.SetConfigType("yml")
	viper.AddConfigPath(cwd + "/logTransfer/config") //获取配置文件路径

	err := viper.ReadInConfig()
	return err
}
